package com.bot.webSite.client;

import com.bot.webSite.client.NavAcc;
import com.bot.webSite.client.WebSite.Page;
//import com.bot.webSite.client.WebSite.page;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;

public class NavAcc extends Composite implements HasText {

	private static NavAccUiBinder uiBinder = GWT.create(NavAccUiBinder.class);
	@UiField Button NavAccCONT;
	@UiField Button NavAccFAQ;
	@UiField Button NavAccACC;

	interface NavAccUiBinder extends UiBinder<Widget, NavAcc> {
	}

	

	public NavAcc() {
		initWidget(uiBinder.createAndBindUi(this));
	}

	public NavAcc(String firstName) {
		initWidget(uiBinder.createAndBindUi(this));
	}
	
	
	
	public  void update(Page pageCourante)
	{
		switch (pageCourante)
		{
			case FAQ:
				//this.NavAccFAQ.setText("FAQ") ;
				  this.NavAccFAQ.setVisible(false) ;
				  this.NavAccCONT.setVisible(true);
				this.NavAccACC.setVisible(true) ;
				
			case Contact:
				//this.NavAccCONT.setText("Contact") ;
				  this.NavAccCONT.setVisible(false) ;
				  this.NavAccFAQ.setVisible(true) ;
				this.NavAccACC.setVisible(true) ;	
				
			case Accueil:
				//this.NavAccCONT.setText("Contact") ;
				  this.NavAccACC.setVisible(false) ;
				  this.NavAccFAQ.setVisible(true) ;
				this.NavAccCONT.setVisible(true) ;	
		}
	}
	
	@UiHandler("NavAccFAQ")
	void onButtonClick(ClickEvent event) {
		
		
		
		
		//clickFAQ();
		
		
		
		
	}
	

	

	

	public void setText(String text) {
	}

	public String getText() {
		return null;
	}

}
